package com.mp.approvalreq.entity;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;

import java.util.Date;

public class Leave {

    /**
     * 默认余额类型
     */
    public static final int BALANCE_TYPE_DEFAULT = 0;
    /**
     * 年假余额类型
     */
    public static final int BALANCE_TYPE_ANNUAL = 1;
    /**
     * 调休余额类型
     */
    public static final int BALANCE_TYPE_DAYS_OFF = 2;

    private int id;

    private int companyId;

    private int companyInfoId;

    private int requestId;

    @Deprecated
    private String startTime;

    @Deprecated
    private String endTime;

    private Date realStartTime;

    private Date realEndTime;

    /**
     * 请假开始日期（yyyy-MM-dd）
     */
    private String startDate;
    /**
     * 请假结束日期（yyyy-MM-dd）
     */
    private String endDate;
    /**
     * 开始时间模式  am.上午（针对按半天请假）;pm.下午（针对按半天请假）
     */
    private String startDayMode;
    /**
     * 结束时间模式  am.上午（针对按半天请假）;pm.下午（针对按半天请假）
     */
    private String endDayMode;

    private String leaveType;

    private Integer leaveTypeId;

    private String reason;

    private int duration;

    private Double leaveDays;

    private String showTime;
    /**
     * 最小请假单位：0.按小时;1.按半天;2.按天
     */
    private int leaveTimeUnit;
    /**
     * 请假时长计算方式  0.按工作日; 1.按自然日
     */
    private int leaveCalculateType;

    private String leaveTimeDetail;

    private Integer isLeavePause;

    private Integer pauseBy;

    private Date pauseTime;

    private Integer state;

    @Deprecated
    private Integer contactId;

    private Integer finished;
    /**
     * 余额类型: 0.默认（无扣除）; 1.年假余额; 2.调休余额
     */
    private Integer balanceType;

    private String createTime;

    @JSONField(serialize = false)
    private String approvalNum;

    public Leave() {
    }

    public Leave(Date realStartTime, Date realEndTime) {
        this.realStartTime = realStartTime;
        this.realEndTime = realEndTime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getCompanyId() {
        return companyId;
    }

    public void setCompanyId(int companyId) {
        this.companyId = companyId;
    }

    public int getCompanyInfoId() {
        return companyInfoId;
    }

    public void setCompanyInfoId(int companyInfoId) {
        this.companyInfoId = companyInfoId;
    }

    public int getRequestId() {
        return requestId;
    }

    public void setRequestId(int requestId) {
        this.requestId = requestId;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public Date getRealStartTime() {
        return realStartTime;
    }

    public void setRealStartTime(Date realStartTime) {
        this.realStartTime = realStartTime;
    }

    public Date getRealEndTime() {
        return realEndTime;
    }

    public void setRealEndTime(Date realEndTime) {
        this.realEndTime = realEndTime;
    }

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getStartDayMode() {
        return startDayMode;
    }

    public void setStartDayMode(String startDayMode) {
        this.startDayMode = startDayMode;
    }

    public String getEndDayMode() {
        return endDayMode;
    }

    public void setEndDayMode(String endDayMode) {
        this.endDayMode = endDayMode;
    }

    public String getLeaveType() {
        return leaveType;
    }

    public void setLeaveType(String leaveType) {
        this.leaveType = leaveType;
    }

    public Integer getLeaveTypeId() {
        return leaveTypeId;
    }

    public void setLeaveTypeId(Integer leaveTypeId) {
        this.leaveTypeId = leaveTypeId;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public int getDuration() {
        return duration;
    }

    public Double getLeaveDays() {
        return leaveDays;
    }

    public void setLeaveDays(Double leaveDays) {
        this.leaveDays = leaveDays;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    public String getShowTime() {
        return showTime;
    }

    public void setShowTime(String showTime) {
        this.showTime = showTime;
    }

    public int getLeaveTimeUnit() {
        return leaveTimeUnit;
    }

    public void setLeaveTimeUnit(int leaveTimeUnit) {
        this.leaveTimeUnit = leaveTimeUnit;
    }

    public int getLeaveCalculateType() {
        return leaveCalculateType;
    }

    public void setLeaveCalculateType(int leaveCalculateType) {
        this.leaveCalculateType = leaveCalculateType;
    }

    public String getLeaveTimeDetail() {
        return leaveTimeDetail;
    }

    public void setLeaveTimeDetail(String leaveTimeDetail) {
        this.leaveTimeDetail = leaveTimeDetail;
    }

    public Integer getIsLeavePause() {
        return isLeavePause;
    }

    public void setIsLeavePause(Integer isLeavePause) {
        this.isLeavePause = isLeavePause;
    }

    public Integer getPauseBy() {
        return pauseBy;
    }

    public void setPauseBy(Integer pauseBy) {
        this.pauseBy = pauseBy;
    }

    public Date getPauseTime() {
        return pauseTime;
    }

    public void setPauseTime(Date pauseTime) {
        this.pauseTime = pauseTime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getContactId() {
        return contactId;
    }

    public void setContactId(Integer contactId) {
        this.contactId = contactId;
    }

    public Integer getFinished() {
        return finished;
    }

    public void setFinished(Integer finished) {
        this.finished = finished;
    }

    public Integer getBalanceType() {
        return balanceType;
    }

    public void setBalanceType(Integer balanceType) {
        this.balanceType = balanceType;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getApprovalNum() {
        return approvalNum;
    }

    public void setApprovalNum(String approvalNum) {
        this.approvalNum = approvalNum;
    }

    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }
}
